<?php
/**
 * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý
 */

/**
 * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile)
 */

interface Enterprise_Models_Interface_Enterprise
{
    /**
    * Add new enterprise
    *
    * @param Enterprise_Models_Enterprise $enterprise
    * @return int
    */
    public function add($enterprise);

    /**
    * Search for enterprise by collection of conditions
    *
    * @param int $offset
    * @param int $count
    * @param array $exp Searching conditions. An array contain various conditions, keys including:
    * - id
    * @return Tomato_Model_RecordSet
    */
    public function find($offset, $count, $exp = null);

    /**
    * Count the number of enterprise by collection of conditions
    *
    * @param array $exp Searching conditions (@see find)
    * @return int
    */
    public function count($exp = null);

    /**
    * Get enterprise by given Id
    *
    * @param int $id Id of enterprise
    * @return Enterprise_Models_Enterprise
    */
    public function getById($id);

    /**
    * Update enterprise
    *
    * @param Enterprise_Models_Enterprise $enterprise
    * @return int
    */
    public function update($enterprise);

    /**
    * Update enterprise width deleted = 1
    *
    * @param Enterprise_Models_Enterprise $enterprise
    * @return int
    */
    public function delete($enterprise);

    /**
     * Get professtions
     * @return Tomato_Model_RecordSet
     **/
    public function getProfessions();

    /**
     * Add enterprise_id to professions
     * @param: $professions array()
     * @return: void
     **/
    public function updateProfessions($professions);

    /**
     * Delete enterprise_id
     * @param: $professions array()
     * @return void
     **/
    public function updateProfessions1($professions);
}
